﻿using System;

namespace program16
{
    class Program
    {
        /// <summary>
        /// 颜色的结构体
        /// </summary>
        public struct MyColor
        {
            public int Red;
            public int Green;
            public int Blue;
        }
        public enum Gender
        {
            男,
            女
        }
        public struct Person
        {
            public string Name;//字段
            public Gender Gender;
            public int Age;
        }
            static void Main(string[] args)
            {
                MyColor myColor;
                myColor.Red = 0;
                myColor.Green = 1;
                myColor.Blue = 2;
                Console.WriteLine("red:0，green:1,blue:2");
                Console.WriteLine(myColor.Red);

                Person person1;
                person1.Name = "张三";
                person1.Age = 18;
                person1.Gender = Gender.男;

                Person person2;
                person2.Name = "小兰";
                person2.Age = 16;
                person2.Gender = Gender.女;
                Console.WriteLine("姓名：{0}，性别:{1},年龄：{2}", person1.Name, person1.Gender, person1.Age);
                Console.WriteLine("姓名：{0}，性别:{1},年龄：{2}", person2.Name, person2.Gender, person2.Age);
            }
        }
    }
